<html>
<head><meta charset="utf-8"><title>never type fallback · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/never.20type.20fallback.html">never type fallback</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="190550367"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/never%20type%20fallback/near/190550367" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/never.20type.20fallback.html#190550367">(Mar 13 2020 at 20:20)</a>:</h4>
<p>Hey <span class="user-mention" data-user-id="125294">@Aaron Hill</span> -- we should touch base at some point on never type fallback (cc <span class="user-mention" data-user-id="248599">@llogiq</span>). I'm curious to push a bit on this approach that I had been advocating for early on and I'm wondering if either of you have interest in exploring that.</p>



<a name="191050221"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/never%20type%20fallback/near/191050221" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/never.20type.20fallback.html#191050221">(Mar 18 2020 at 22:21)</a>:</h4>
<p>Sounds good to me</p>



<a name="192438123"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/never%20type%20fallback/near/192438123" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/never.20type.20fallback.html#192438123">(Mar 31 2020 at 19:29)</a>:</h4>
<p>OK <span class="user-mention" data-user-id="125294">@Aaron Hill</span> <span class="user-mention" data-user-id="248599">@llogiq</span> so .. let me try to circle back to this yet again. =) So I wrote a <a href="https://github.com/rust-lang/rust/issues/66173#issuecomment-574897034" title="https://github.com/rust-lang/rust/issues/66173#issuecomment-574897034">comment</a> that linked to a branch. The key idea there was to (a) identify type variables that that got their value as a result of diverging fallback and then (b) warn when we find those type variables in "certain contexts". The challenge is narrowing down that notion of "certain contexts". </p>
<p>The current branch was just warning whenever the type of <strong>any expression</strong> is changed as a result of "diverging fallback". That's clearly not correct. I think what we conceptually want is to warn whenever the type of a <strong>live</strong> expression is changed as the result of diverging fallback. That raises, of course, the question of how to determine where the "live" expressions are.</p>



<a name="192438142"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/never%20type%20fallback/near/192438142" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/never.20type.20fallback.html#192438142">(Mar 31 2020 at 19:29)</a>:</h4>
<p>I think I will leave some comments in the github issue</p>



<a name="192440400"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/never%20type%20fallback/near/192440400" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/never.20type.20fallback.html#192440400">(Mar 31 2020 at 19:47)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/66173#issuecomment-606836855" title="https://github.com/rust-lang/rust/issues/66173#issuecomment-606836855">Done</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>